import java.util.Scanner;

public class Scret {

    public static void main(String[] args) {
        System.out.println("请输入四位密码：");
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        System.out.println(jiaMi(i));
    }

    public static String jiaMi(int k) {
        String rs = "";
        rs += (k % 10 + 5) % 10;
        rs += (k / 10 % 10 + 5) % 10;
        rs += (k / 100 % 10 + 5) % 10;
        rs += (k / 1000 % 10 + 5) % 10;
        return rs;


    }
}
